// fileName      :  conse.go
// createdAt     :  2021-10-19
// description   :

package constant

import (
	"time"
	"zl-gin/my_error"
)

//常用返回
var (
	ResponseDataNotFound = my_error.NewMyError(my_error.ErrorCodeDataNotFound)
	ResponseSuccess      = my_error.NewMyError(my_error.ErrorCodeSuccess)
	ResponseEmptyToken   = my_error.NewMyError(my_error.ErrorCodeEmptyToken)
	ResponseInvalidToken = my_error.NewMyError(my_error.ErrCodeInvalidToken)
	ResponseParamError   = my_error.NewMyError(my_error.ErrCodeParamError)
	ResponseGetTokenFail = my_error.NewMyError(my_error.ErrCodeGetTokenFail)
	ResponseTokenExpire  = my_error.NewMyError(my_error.ErrCodeTokenExpire)
)

//jwt token
const (
	TokenExpireDuration = time.Hour * 2
	TokenSecret         = "this is a secret"
)

//  从Token内读取信息的关键key
const (
	AuthUserNameKey = "userName"
	AuthUserIdKey   = "userId"
)
